<template>
    <div class="main-task-list-view">

      <modules-title class="title-position" titleName="任务管理">

        <template slot="btn">
        </template>

      </modules-title>


      <div class="pj-content">

        <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="全部视图" name="1">

            <div class="screen-view">

              <el-form
                ref="queryForm"
                :model="screenData"
                :inline="true"
                label-width="68px"
              >

                <el-form-item label="任务人员">
                  <el-select
                    v-model="screenData.status"
                    placeholder="请选择人员"
                    size="small"
                    @change="statusChange"
                  >
                    <el-option
                      v-for="dict in statusOptions"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    />
                  </el-select>
                </el-form-item>

                <el-form-item label="任务类型">
                  <el-select
                    v-model="screenData.type"
                    placeholder="请选择类型"
                    size="small"
                    @change="typeChange"
                  >
                    <el-option
                      v-for="dict in typeOptions"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    />
                  </el-select>
                </el-form-item>

                <el-form-item label="任务名称">
                  <el-input v-model="screenData.name" placeholder="请输入名称" clearable></el-input>
                </el-form-item>

                <el-form-item>

                  <el-button type="primary" size="small" @click="handleQuery">搜索
                  </el-button>
                  <el-button plain size="small" @click="resetQuery">重置</el-button>
                </el-form-item>
              </el-form>
            </div>

            <el-table v-loading="loading" border size="medium" :data="taskList" @row-click="tableRowClick">
              <el-table-column label="里程碑/任务名称" align="left"  min-width="110px" header-align="center" prop="task_name" />
              <el-table-column label="任务类型" align="center" >
                <template slot-scope="scope">
                  <span v-if="scope.row.level == 1">里程碑</span>
                  <span v-else-if="scope.row.has_children">摘要任务</span>
                  <span v-else>任务</span>
                </template>
              </el-table-column>
              <el-table-column label="工期（天）" align="center" prop="duration" />
              <el-table-column label="任务进度" align="center" >
                <template slot-scope="scope">
                  <span>{{scope.row.task_progress}}%</span>
                </template>
              </el-table-column>
              <el-table-column label="负责人" align="center">
                <template slot-scope="scope">
                  <span v-if="scope.row.person_in_charge">{{scope.row.person_in_charge.member_name}}</span>
                </template>
              </el-table-column>
              <el-table-column label="计划开始时间" align="center" prop="start_date" >
                <template slot-scope="scope">
                  {{scope.row.start_date ? dateFormat1('yyyy-mm-dd',scope.row.start_date) : ""}}
                </template>
              </el-table-column>
              <el-table-column label="计划结束时间" align="center" prop="end_date">
                <template slot-scope="scope">
                  {{scope.row.end_date ? dateFormat1('yyyy-mm-dd',scope.row.end_date) : ""}}
                </template>
              </el-table-column>
              <el-table-column label="实际开始时间" align="center" prop="real_start_date">
                <template slot-scope="scope">
                  {{scope.row.real_start_date ? dateFormat1('yyyy-mm-dd',scope.row.real_start_date) : ""}}
                </template>
              </el-table-column>
              <el-table-column label="实际结束时间" align="center" prop="real_end_date" >
                <template slot-scope="scope">
                  {{scope.row.real_end_date ? dateFormat1('yyyy-mm-dd',scope.row.real_end_date) : ""}}
                </template>
              </el-table-column>
              <el-table-column label="参与人" align="center">
                <template slot-scope="scope">
                  <div v-if="scope.row.task_member.length <= 3">
                    <span v-for="(member,index) in scope.row.task_member">{{member.member_name}}{{(index < 2 && index != scope.row.task_member.length-1) ? ',' : ''}}</span>
                  </div>
                  <div v-else>
                    <el-popover
                      placement="top-start"
                      width="100"
                      trigger="hover">
                      <div>
                        <div v-for="item in scope.row.task_member" style="padding-bottom: 5px">
                          <i class="el-icon-user">{{  item.member_name}}</i>
                        </div>
                      </div>
                      <i slot="reference" class="el-icon-user">{{scope.row.task_member.length}}</i>
                    </el-popover>
                  </div>

                </template>
              </el-table-column>
              <el-table-column label="所属项目" align="center" prop="project_name" />
              <el-table-column label="强制验收" align="center" prop="info_no" >
                <template slot-scope="scope">
                  <span>{{scope.row.mandatory_check ? "是" : "否"}}</span>
                </template>
              </el-table-column>
              <el-table-column label="任务状态" align="center" prop="info_status">
                <template slot-scope="scope">
                  <span v-if="scope.row.status == 0">未启动</span>
                  <span v-else-if="scope.row.status == 1">进行中</span>
                  <span v-else-if="scope.row.status == 2">暂停</span>
                  <span v-else-if="scope.row.status == 3">延期</span>
                  <span v-else-if="scope.row.status == 4">待验收</span>
                  <span v-else-if="scope.row.status == 5">验收不通过</span>
                  <span v-else-if="scope.row.status == 6">已完成</span>
                  <span v-else-if="scope.row.status == 7">已终止</span>
                  <div v-if="scope.row.delay_day" style="color: red">延期{{scope.row.delay_day}}天</div>
                </template>
              </el-table-column>
              <el-table-column label="操作" align="left" header-align="center">
                <template slot-scope="scope" >

<!--                  <el-button class="text-btn-yellow" size="medium" type="text" icon="el-icon-document" @click="detailsClick(scope.row.id)">-->
<!--                    详情-->
<!--                  </el-button>-->

                  <div class="tab-opt-view" style="width: 100%" v-if="scope.row.project_status != 53 && scope.row.project_status != 8 && scope.row.project_status != 9">
                    <div>
                      <el-button size="medium" type="text" v-if="scope.row.status == 0 && checkUser(scope.row)" @click="changeStatus(scope.row,1)">开启任务</el-button>
                    </div>
                    <div>
                      <el-button size="medium" type="text" v-if="scope.row.status == 2 && checkUser(scope.row)" @click="changeStatus(scope.row,1)">再次开启</el-button>
                    </div>
                    <div>
                      <el-button size="medium" type="text" v-if="(scope.row.status == 1 || scope.row.status == 3) && checkUser(scope.row)" @click="changeStatus(scope.row,2)">暂停任务</el-button>
                    </div>
                    <div>
                      <el-button size="medium" type="text" v-if="((scope.row.status == 1 || scope.row.status == 3 || scope.row.status == 5) && scope.row.mandatory_check) && checkUser(scope.row) && scope.row.children_end" @click="changeStatus(scope.row,4)">提交验收</el-button>
                    </div>
                    <div>
                      <el-button class="text-btn-red" size="medium" type="text" v-if="((scope.row.status == 1 || scope.row.status == 3) && !scope.row.mandatory_check) && checkUser(scope.row) && scope.row.children_end" @click="changeStatus(scope.row,6)">结束任务</el-button>
                    </div>
                    <div>
                      <el-button size="medium" type="text" @click="changeClick(scope.row,1)" v-if="checkUser(scope.row) && (!scope.row.is_apply && scope.row.status < 6 && scope.row.status != 4 && scope.row.status != 2)">变更申请</el-button>
                    </div>
                  </div>

<!--                  <el-button size="medium" type="text" v-if="(scope.row.status == 1 || scope.row.status == 3) && checkUser(scope.row)">延期任务</el-button>-->

                </template>
              </el-table-column>
            </el-table>

            <pagination
              style="display:flex;justify-content:flex-end;"
              :total="total"
              :page.sync="pageNum"
              :limit.sync="pageSize"
              @pagination="getListData"
            />

          </el-tab-pane>
          <el-tab-pane label="项目视图" name="2">

            <div class="screen-view">

              <el-form ref="form" :inline="true" :model="form" label-width="100px">
                <el-form-item label="当前项目">
                  <el-select v-model="form.project" placeholder="请选择" @change="projectChange">
                    <el-option
                      v-for="item in projectList"
                      :key="item.id"
                      :label="item.name"
                      :value="item.id">
                    </el-option>
                  </el-select>
                </el-form-item>

                <el-form-item label="任务人员">
                  <el-select
                    v-model="screenData1.with_me"
                    placeholder="请选择类型"
                    size="small"
                    @change="status1Change"
                  >
                    <el-option
                      v-for="dict in statusOptions"
                      :key="dict.value"
                      :label="dict.label"
                      :value="dict.value"
                    />
                  </el-select>
                </el-form-item>

                <el-form-item label="任务名称">
                  <el-input v-model="screenData1.task_name" placeholder="请输入名称" clearable></el-input>
                </el-form-item>

                <el-form-item label="只看里程碑">
                  <el-checkbox v-model="planChecked" @change="planChange"></el-checkbox>
                </el-form-item>

                <el-form-item>

                  <el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery1">搜索
                  </el-button>
                  <el-button plain icon="el-icon-refresh" size="small" @click="resetQuery1">重置</el-button>
                </el-form-item>
              </el-form>

            </div>

            <el-table
              @row-click="tableRowClick"
              class="spacialTable"
              size="medium"
              :data="taskData"
              border
              row-key="id"
              default-expand-all
              :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
              style="width: 100%">
              <!--        <el-table-column-->
              <!--          prop="no"-->
              <!--          label="序号"-->
              <!--          width="80">-->
              <!--        </el-table-column>-->
<!--              <el-table-column-->
<!--                type="index"-->
<!--                label="序号">-->
<!--              </el-table-column>-->
              <el-table-column
                align="left"
                header-align="center"
                min-width="110px"
                label="里程碑/任务名称">
                <template slot-scope="scope">

                  <span v-if="(!scope.row.children || !scope.row.children.length) && scope.row.level == 1" style="padding-left: 25px">  </span>
                  <span>{{scope.row.task_name}}</span>

                </template>
              </el-table-column>
              <el-table-column
                align="center"
                label="任务进度">
                <template slot-scope="scope">
                  <span>{{scope.row.task_progress}}%</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                label="计划开始日期">
                <template slot-scope="scope">

                  <span>{{scope.row.start_date ? dateFormat1('yyyy-mm-dd',scope.row.start_date) : ''}}</span>

                </template>
              </el-table-column>
              <el-table-column
                align="center"
                label="计划结束日期">
                <template slot-scope="scope">

                  <span>{{scope.row.end_date ? dateFormat1('yyyy-mm-dd',scope.row.end_date) : ''}}</span>

                </template>
              </el-table-column>
              <el-table-column
                align="center"
                label="实际开始日期">
                <template slot-scope="scope">
                  <span>{{scope.row.real_start_date ? dateFormat1('yyyy-mm-dd',scope.row.real_start_date) : ''}}</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                label="实际结束日期">
                <template slot-scope="scope">
                  <span>{{scope.row.real_end_date ? dateFormat1('yyyy-mm-dd',scope.row.real_end_date) : ''}}</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                prop="duration"
                label="工期（天）">
              </el-table-column>
              <el-table-column
                align="center"
                label="负责人">
                <template slot-scope="scope">
                  <span v-if="scope.row.person_in_charge">{{scope.row.person_in_charge.member_name}}</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                label="阶段性评审">
                <template slot-scope="scope">
                  <span>{{scope.row.periodical_review?'是':'否'}}</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                label="强制验收">
                <template slot-scope="scope">
                  <span>{{scope.row.mandatory_check?'是':'否'}}</span>
                </template>
              </el-table-column>
              <el-table-column
                align="center"
                label="任务状态">
                <template slot-scope="scope">
                  <span v-if="scope.row.status == 0">未启动</span>
                  <span v-if="scope.row.status == 1">进行中</span>
                  <span v-if="scope.row.status == 2">暂停</span>
                  <!--        <span v-if="datas.status == 3">延期</span>-->
                  <span v-if="scope.row.status == 4">待验收</span>
                  <span v-if="scope.row.status == 5">验收不通过</span>
                  <span v-if="scope.row.status == 6">已完成</span>

                  <div v-if="scope.row.delay_day" style="color: red">延期{{scope.row.delay_day}}天</div>
                </template>
              </el-table-column>
              <el-table-column
                align="left"
                header-align="center"
                label="操作">
                <template slot-scope="scope">
<!--                  <el-button class="text-btn-green" size="medium" type="text" icon="el-icon-document" @click="detailsClick(scope.row.id)">-->
<!--                    详情-->
<!--                  </el-button>-->

                  <div class="tab-opt-view" style="width: 100%" v-if="scope.row.project_status != 53 && scope.row.project_status != 8 && scope.row.project_status != 9">
                    <div>
                      <el-button size="medium" type="text" v-if="scope.row.status == 0 && checkUser(scope.row)" @click="changeStatus(scope.row,1)">开启任务</el-button>
                    </div>
                    <div>
                      <el-button size="medium" type="text" v-if="scope.row.status == 2 && checkUser(scope.row)" @click="changeStatus(scope.row,1)">再次开启</el-button>
                    </div>
                    <div>
                      <el-button size="medium" type="text" v-if="(scope.row.status == 1 || scope.row.status == 3) && checkUser(scope.row)" @click="changeStatus(scope.row,2)">暂停任务</el-button>
                    </div>

                    <div>
                      <el-button size="medium" type="text" v-if="((scope.row.status == 1 || scope.row.status == 3 || scope.row.status == 5) && scope.row.mandatory_check) && checkUser(scope.row) && (scope.row)" @click="changeStatus(scope.row,4)">提交验收</el-button>
                    </div>
                    <div>
                      <el-button class="text-btn-red" size="medium" type="text" v-if="(scope.row.status == 1 || scope.row.status == 3) && checkUser(scope.row) && !scope.row.mandatory_check && checkEndTask(scope.row)" @click="changeStatus(scope.row,6)">结束任务</el-button>
                    </div>

                    <div>
                      <el-button size="medium" type="text" @click="changeClick(scope.row,2)" v-if="checkUser(scope.row) && (!scope.row.is_apply && scope.row.status < 6 && scope.row.status != 4 && scope.row.status != 2)">变更申请</el-button>
                    </div>
                  </div>

<!--                  <el-button size="medium" type="text" v-if="(scope.row.status == 1 || scope.row.status == 3) && checkUser(scope.row)">延期任务</el-button>-->



                </template>
              </el-table-column>
            </el-table>

          </el-tab-pane>

        </el-tabs>

      </div>

      <el-dialog
        v-if="dialogVisible"
        title="任务变更申请"
        :visible.sync="dialogVisible"
        width="800px"
        :before-close="handleClose">

        <change-task-view ref="changeView" :project-name="selectData.project_name" :members="members"></change-task-view>

        <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmClick">提交审批</el-button>
      </span>
      </el-dialog>

    </div>
</template>

<script>
  import changeTaskView from "../../project/details/modules/taskListView/modules/changeTaskView";
    export default {
        name: "index",
        components:{changeTaskView},
        data:function () {
            return{
                screenData:{
                    wait_do:0,
                    name:'',
                    status:0,
                    type:0,
                },
                screenData1:{
                    with_me:0,
                    task_type:0,
                    task_name:'',
                    project_id:'',
                },
                statusOptions:[
                    {
                        label:'全部',
                        value:0,
                    },
                    {
                        label:'我负责的',
                        value:1,
                    },
                    {
                        label:'我参与的',
                        value:2,
                    },
                    {
                        label:'我下级参与的',
                        value:3,
                    },
                ],
                typeOptions:[
                    {
                        label:'全部',
                        value:0,
                    },
                    {
                        label:'只看里程碑',
                        value:1,
                    },
                    {
                        label:'不看里程碑',
                        value:2,
                    },
                ],
                loading:false,
                total:0,
                pageNum:1,
                pageSize:10,
                activeName:"1",
                taskList:[],
                tableData:[],
                projectList:[],
                form:{},

                planChecked:false,
                taskData:[],
                taskData2:[],

                selectData:{},

                dialogVisible:false,

                changeType:1,
                members:[],
            }
        },
        created(){
            if (this.$route.query.research){
                this.screenData.wait_do = 1;
            }
        },
        mounted:function() {
            this.getProjectList();
            this.getListData();
        },
        beforeRouteEnter(to,from,next){
            to.params.refresh = from.params.refresh

            next()
        },
        activated:function(){
            if (this.$route.params.refresh){
                this.getListData()
                this.getTaskTree()
            }
        },
        methods:{
            checkUser:function(data){
                if (data.person_in_charge && data.person_in_charge.member_id == this.$store.getters.userInfo.user.id){
                    return true;
                }else {
                    return false;
                }
            },
            handleClose:function(){
                this.dialogVisible = false;
            },
            handleClick:function () {

            },
            checkEndTask:function(item){
                if (item.children && item.children.length){
                    let b = true;
                    for (let i = 0; i < item.children.length; i++){
                        if (item.children[i].status != 6){
                            b = false;
                            break;
                        }
                    }
                    return b
                }else {
                    return true;
                }
            },
            getListData:function(){
                let data1 = {
                    wait_do:this.screenData.wait_do,
                    status:-1,
                    with_me:this.screenData.status,
                    task_type:this.screenData.type,
                    task_name:this.screenData.name,
                    pager:{
                        limit:this.pageSize,
                        skip:this.pageNum,
                    }
                }
                this.$api.PROJECT_START_TASK_LIST(data1).then(res=>{
                    if (res.code == 200){
                        this.taskList = res.data.data ? res.data.data : [];
                        this.total = res.data.total;
                    }else{
                        this.$message.error(res.msg)
                    }
                }).catch(err=>{

                })
            },
            getProjectList:function () {

                // let data = {
                //     pager:{
                //         limit:100,
                //         skip:1,
                //         OrderBy:'',
                //         OrderMethod:-1
                //     }
                // }
                // this.$api.PROJECT_MANAGER_PROJECT_LIST(data).then(res=>{
                //     if (res.code == 200){
                //         this.projectList = res.data.data;
                //     }
                // }).catch(err=>{
                //
                // })

                this.$api.PROJECT_START_PROJECT_LIST_ONGOING().then(res=>{
                    if (res.code == 200){
                        this.projectList = res.data;

                        if (this.projectList.length){

                            this.form.project = this.projectList[0].id;
                            this.screenData1.project_id = this.projectList[0].id;
                            this.getTaskTree()
                        }
                    }
                }).catch(err=>{

                })
            },
            projectChange:function (id) {
                this.taskData = [];
                // this.$api.PROJECT_MANAGER_PROJECT_DETAIL(id).then(res=>{
                //     if (res.code == 200){
                //         let data = res.data;
                //
                //         if (data && data.project_task){
                //             this.taskData = data.project_task
                //         }
                //     }
                // }).catch(err=>{
                //
                // })
                this.screenData1.project_id = id;
                this.getTaskTree()


            },
            getTaskTree:function(){
                this.$api.PROJECT_START_TASK_PROJECT_TREE(this.screenData1).then(res=>{
                    if (res.code == 200){
                        this.taskData = res.data ? res.data : [];
                    }else{
                        this.$message.error(res.msg)
                    }
                })
            },
            planChange:function(){
                if (this.planChecked){
                    this.screenData1.task_type = 1
                }else {
                    this.screenData1.task_type = 0
                }
                this.getTaskTree()
            },
            status1Change:function(){
                this.getTaskTree()
            },
            handleQuery1:function(){
                this.getTaskTree()
            },
            resetQuery1:function(){
                this.form.project = ""
                this.screenData1.project_id = ""
                this.screenData1.task_name = ""
                this.screenData1.with_me = 0;
                this.screenData1.task_type = 0;
                this.planChecked = false;
                this.taskData = []
                this.getTaskTree()
            },
            tableRowClick:function(row, column, event){
                if (column.label != '操作'){
                    this.$router.push({name:'projectManagementTaskDetail',query:{id:row.id,t:new Date().getTime()}});
                }
            },
            detailsClick:function (id) {
                this.$router.push({name:'projectManagementTaskDetail',query:{id:id,t:new Date().getTime()}});
            },
            changeClick:function (row,type) {
                this.changeType = type;

                this.selectData = row;

                if (this.selectData.parent_id){
                    this.$api.PROJECT_START_TASK_DETAIL(this.selectData.parent_id).then(res=>{
                        if (res.code == 200){

                            this.members = res.data.task_member;

                            this.dialogVisible = true;
                            setTimeout(() => {
                                if (this.$refs.changeView){
                                    this.$refs.changeView.setData(this.selectData)
                                }
                            },500)
                        }else {
                            this.$message.error(res.msg)
                        }
                    }).catch(err=>{

                    })
                }else if (this.selectData.project_id){

                    this.$api.PROJECT_MANAGER_PROJECT_DETAIL(this.selectData.project_id).then(res=>{
                        if (res.code == 200){
                            this.members = res.data.member;

                            this.dialogVisible = true;
                            setTimeout(() => {
                                if (this.$refs.changeView){
                                    this.$refs.changeView.setData(this.selectData)
                                }
                            },500)
                        }else {
                            this.$message.error(res.msg)
                        }
                    }).catch(err=>{

                    })
                }

            },
            confirmClick:function () {

                if (this.$refs.changeView){

                    this.$refs.changeView.validateForm().then(()=>{
                        this.dialogVisible = false;
                        let data = {
                            object_id:this.selectData.id,
                            project_id:this.selectData.project_id,
                            project_name:this.selectData.project_name,
                            change_type:3,
                            reason_id:this.$refs.changeView.datas.change_cause_id,
                            reason:this.$refs.changeView.datas.change_cause,
                            description:this.$refs.changeView.datas.details_describe,
                            level_id:this.$refs.changeView.datas.change_level_id,
                            level:this.$refs.changeView.datas.change_level,
                            change_describe:this.$refs.changeView.datas.change_describe,
                            task_after:{
                                is_update_task_time:Number(this.$refs.changeView.datas.is_update_task_time),
                                start_date:this.$refs.changeView.datas.start_date,
                                end_date:this.$refs.changeView.datas.end_date,
                                duration:this.$refs.changeView.datas.duration,
                                person_in_charge:this.$refs.changeView.datas.person_in_charge,
                                task_member_id:this.$refs.changeView.datas.task_member_id,
                                task_member:this.$refs.changeView.datas.task_member,
                            }
                        }

                        this.$api.PROJECT_START_CHANGE_CREATE(data).then(res=>{
                            if (res.code == 200){
                                this.$message.success("提交成功")

                                if (this.changeType == 1){
                                    this.getListData();
                                }else if (this.changeType == 2){
                                    this.getTaskTree()
                                }
                            }else {
                                this.$message.error(res.msg)
                            }
                        }).catch(err=>{

                        })

                    })

                }else{
                    this.dialogVisible = false;
                }


            },
            statusChange:function () {
                this.screenData.wait_do = 0;
                this.pageNum = 1;
                this.getListData();
            },
            typeChange:function () {
                this.screenData.wait_do = 0;
                this.pageNum = 1;
                this.getListData();
            },
            handleQuery:function () {
                this.screenData.wait_do = 0;
                this.pageNum = 1;
                this.getListData();
            },
            resetQuery:function () {
                this.screenData.wait_do = 0;
                this.screenData.status = 0;
                this.screenData.type = 0;
                this.screenData.name = "";
                this.pageNum = 1;
                this.getListData();
            },
            changeStatus:function (row,status) {
                if (status == 4 || status == 6){
                    if (row.files && row.files.length){
                        let bo = true
                        for (let i = 0; i < row.files.length; i++){
                            let file = row.files[i]
                            if (!file.file || !file.file.id){
                                bo = false
                                break;
                            }
                        }
                        if (!bo){
                            this.$message.error("请上传任务相关文档")
                            return
                        }
                    }
                }

                let str = ""

                if (status == 1){
                    str = '是否确认开启此任务?'
                }else if (status == 2) {
                    str = '是否确认暂停此任务?'
                }else if (status == 4) {
                    str = '是否确认提交任务验收?'
                }else if (status == 6) {
                    str = '是否确认结束任务?'
                }

                this.$confirm(str , '提示', {
                    confirmButtonText: '确定',
                    cancelButtonText: '取消',
                    type: 'warning'
                }).then(() => {
                    let data = {
                        id:row.id,
                        status:status
                    }

                    this.$api.PROJECT_START_TASK_STATUS(data).then(res=>{
                        if (res.code == 200){

                            this.getListData();
                            this.getTaskTree()
                        }else {
                            this.$message.error(res.msg);
                        }
                    }).catch(err=>{

                    })

                }).catch(() => {

                });

            }
        }
    }
</script>

<style lang="scss" >
  @import "../../../../assets/scss/views/projectManagement/taskList/taskList.scss";
  .main-task-list-view .content .el-table__row{
    height: 60px;
  }
</style>
